pluginHome = new File( grailsSettings.projectPluginsDir.path ).listFiles().find { it.name.startsWith('cloud-tools-') }
if(pluginHome == null) pluginHome = "."

includeTargets << new File( "${pluginHome}/scripts/CloudToolsInit.groovy" )

target('default': "Recreates the db") {
	recreate()
}

target(recreate: "The implementation task") {
	depends( initCloudToolsService)
    cloudToolsService.withCluster {manager, clusterName, cluster->
        cluster.dbRecreate();
    }
	event('StatusFinal', ['Finished with db-recreate'])
}
